package fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.xiyoumobile.dengtuo.flowershop.R;

/**
 * Created by Admin on 2016/3/8.
 */
public class MeFragment extends Fragment {

    WebView webView;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.me_index,null);
        findView(view);
        return view;
    }

    private void findView(View view) {

        webView = (WebView) view.findViewById(R.id.webView);


        // WebView打开权限
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setSupportZoom(true);
        // SWF文件运行权限
        // webView.getSettings().setPluginsEnabled(true);

        // webView.setWebChromeClient(new ExtWebChromeClient());
        webView.setWebViewClient(new WebViewClient());
       /* JaveScriptInterfaceImpl intf =
                new JaveScriptInterfaceImpl(this, webView.getSettings().getUserAgentString());*/
        // webView.addJavascriptInterface(intf, "native");

        webView.loadUrl("file:///android_asset/aboutMe.html");
    }
}
